import Vue from 'vue';
import Vuex from 'vuex';
import axios from 'axios';
import VueRouter from 'vue-router';
import RoomDetail from './components/RoomDetail';
import RoomBase from './components/RoomBase';
import RoomAir from './components/RoomAir';
import RoomSwitch from './components/RoomSwitch';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';
import store from './store';

Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.use(Vuex);
Vue.prototype.$http = axios;

const router = new VueRouter({
	mode: 'hash',
	base: __dirname,
	routes: [
		{path: '/', component: RoomBase},
		{path: '/air', component: RoomAir},
		{path: '/switch', component: RoomSwitch}
	]
})

new Vue({
  el: '#app',
  store,
  router,
  render: h => h(RoomDetail)
});